/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.frm.bpm.session;

import java.util.Collection;
import javax.ejb.Local;
import merlion.frm.bpm.entity.CustomerPaymentRecord;
import merlion.frm.bpm.entity.Invoice;
import merlion.frm.bpm.entity.Receipt;
import merlion.scm.lcm.entity.DeliveryOrder;

/**
 *
 * @author Yuwei
 */
@Local
public interface SalesBPSessionBeanLocal {
    public String generateInvoiceId();
    public String generateCustomerPaymentRecordId();
    public String generateReceiptId();
    public String generateSupplierPaymentRecordId();
    public DeliveryOrder getDeliveryOrderById(Long id);
    public Invoice createInvoice(DeliveryOrder deliveryOrder);
    public Invoice saveInvoice(Invoice invoice);
    public Collection<Invoice> getAllInvoice();
    public CustomerPaymentRecord saveCustomerPaymentRecord(CustomerPaymentRecord cpr);
    public Receipt saveReceipt(Receipt receipt);
    public Collection<CustomerPaymentRecord> getAllCustomerPaymentRecord();
    public Collection<Receipt> getAllReceipt();
    public Collection<Invoice> getAllUnpaidInvoice();
    public Invoice getInvoiceById(Long invoiceId);
    public void refund(CustomerPaymentRecord cpr);
}
